/*******************************************************
> Copyright (C) 2024 ==IOT== All rights reserved.
> File Name: stl_array.cpp
> Author: IOT
> Website:www.slq.org
> Created Time: 2024年10月29日 星期二 14时59分56秒
***************************************************/

#include <iostream>

#include <array> // 包含容器array(array头文件,定义了array的类模板)

using namespace std;

void print_array(array<int, 3>& arr);

int main(int argc,const char* argv[])
{
	array<int, 3> age = {21,25, 28};
	
	cout << age.size() << endl;
	cout << age.max_size() << endl;
	
	print_array(age);
	
    return 0;
}
//
void print_array(array<int, 3>& arr)
{
	int len = arr.size();
	for (int i = 0;i < len; i++)
		cout << arr[i] << " ";
	cout << endl;
}
